home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HamCall (October 1991)
/
HamCall (Whitehall Publishing)(1991).bin
/
bcast
/
bcstcble
/
pad.asc
< prev
next >
Wrap
Text File
|
1990-10-14
|
1KB
|
29 lines
10 CLS
15 PRINT" AUDIO PAD CALCULATOR "
16 PRINT" "
20 A$="": B$=" Each" : C$="" : F=1
30 A1$=" Series " :B1$=" Shunt ":D$=" Resistor: "
40 INPUT " Desired attenuation (dB): ",DB
50 N=10^(DB/10):NT=(N+1)/(N-1)
60 INPUT " Input Impedance: ",Z1
70 INPUT " Output Impedance: ",Z2
75 DEF FNA(Z)=F*(Z*NT-R3)
80 INPUT " Type (T,H,PI,O): ",T$
90 ON INSTR(" HTOPI",T$)+1 GOTO 80,80,100,110,120,130
100 SWAP A$,B$ : F= .5
110 R3=2*SQR(N*Z1*Z2)/(N-1) : R1=FNA(Z1):R2=FNA(Z2): GOTO 165
120 SWAP A$,B$ : F= .5
130 SWAP A1$,B1$: SWAP A$,C$
140 R3=(N-1)*SQR(Z1*Z2/N)/2
150 R1=1/((1/Z1)*NT-1/R3)
160 R3 =F*R3
165 PRINT "Loss ";TAB(34) DB
168 PRINT "In-Out Z ";TAB(34) Z1; "-" ; Z2
170 R2=1/((1/Z2)*NT-1/R3)
190 PRINT A$ " Input "A1$ D$ TAB(34) R1
200 PRINT C$ B1$ D$ TAB(34) R3
210 PRINT A$ " Output " A1$ D$ TAB(34) R2
220 PRINT
230 INPUT "ANOTHER ";A$ : IF LEFT$(A$,1)="Y"GOTO 20
240 END